<div id="main" style="width: 1560px;height:560px;"></div>
<script src="{{ asset('echarts/echarts/dist/echarts.js') }}"></script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(
        document.getElementById('main'),
        'vintage'
    );

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: {!! json_encode(json_decode($data,true)['head']) !!}
        },
        tooltip: {},
        legend: {
            x:'center',      //可设定图例在左、右、居中
            y:'bottom',     //可设定图例在上、下、居中
            data: {!! json_encode(json_decode($data,true)['title']) !!}
        },
        xAxis: {
            data: {!! json_encode(json_decode($data,true)['employee_name']) !!}
        },
        color: ['#3aa1ff','#4ecb73'],
        yAxis: {},
        series: [{!! $series !!}
        ],
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
    setTimeout(function (){
        window.onresize = function () {
            myChart.resize();
        }
    },200)
</script>
<!-- 引入 echarts.js -->
